In [12]:
import pandas as pd
import numpy as np
In [13]:
timing_file = '../data/all_results_janus_single_node_1-14-17.csv'
properties_file = '../data/uflorida-features.csv'
In [14]:
timings = pd.read_csv(timing_file, header=0)
properties = pd.read_csv(properties_file, header=0)
In [15]:
timings.columns= ['np', 'matrix', 'solver', 'prec', 'status', 'time', 'iters', 'resid']
properties.columns = ['rows', 'cols', 'min_nnz_row', 'row_var', 'col_var', 'diag_var', 'nnz', 'frob_norm', 'symm_frob_norm', 'antisymm_frob_norm', 'one_norm', 'inf_norm', 'symm_inf_norm', 'antisymm_inf_norm', 'max_nnz_row', 'trace', 'abs_trace', 'min_nnz_row', 'avg_nnz_row', 'dummy_rows', 'dummy_rows_kind', 'num_value_symm_1', 'nnz_pattern_symm_1', 'num_value_symm_2', 'nnz_pattern_symm_2', 'row_diag_dom', 'col_diag_dom', 'diag_avg', 'diag_sign', 'diag_nnz', 'lower_bw', 'upper_bw', 'row_log_val_spread', 'col_log_val_spread', 'symm', 'matrix']
In [16]:
combined = pd.merge(properties, timings)
combined.info()
In [17]:
combined = combined.dropna()
In [18]:
combined['solver_num'] = combined.solver.map({'FIXED_POINT': 0, 'BICGSTAB': 1, 'MINRES': 2, 'PSEUDOBLOCK_CG': 3, 'PSEUDOBLOCK_STOCHASTIC_CG': 4, 'PSEUDOBLOCK_TFQMR': 5, 'TFQMR': 6, 'LSQR': 7, 'PSEUDOBLOCK_GMRES': 8}).astype(int)
combined['prec_num'] = combined.prec.map({'ILUT': 0, 'RILUK': 1, 'RELAXATION': 2, 'CHEBYSHEV': 3, 'NONE': 4}).astype(int)
combined['status_num'] = combined.status.map({'error': -1, 'unconverged': 0, 'converged': 1}).astype(int)
In [19]:
good = combined[combined.status == 'converged']
In [20]:
good.groupby('solver').size()
Out[20]:
In [76]:
values = {"TFQMR", "PSEUDOBLOCK_TFQMR"}
tfqmr = good.loc[good.solver.isin(values)]
tfqmr.solver.unique()
tfqmr = tfqmr.drop(tfqmr.columns[:36], axis=1)
tfqmr = tfqmr.drop(tfqmr.columns[-3:], axis=1)
tfqmr.info()
In [77]:
tfqmr = tfqmr.groupby('solver')
tfqmr.describe()
Out[77]:
In [ ]: